import { apiResponse } from "./apiResponse"
const fetch = require('node-fetch')

const express = require('express')
const app = express()
let port = 9987

app.get('/', function (req: any, res: any) {
    fetch('https://github.com/')
        .then((res1: { text: () => any }) => res1.text())
        .then((body2: any) => console.log(body2));
    res.json(apiResponse.success())
})

app.listen(port, () => {
    console.log(`Example app listening at http://localhost:${port}`)
})




